#include <iostream>
#include <hwloc.h>
#include <cuda_runtime.h>

int main(int argc, char* argv[]) {
    hwloc_topology_t hwloc_topology;
    hwloc_obj_t hwloc_obj_c;
    hwloc_obj_t hwloc_obj_net;
    hwloc_uint64_t total_mem;
    // network device nums
    int netds;
    int num_sockets, num_numanodes, num_cores, num_threads_per_core;
    int gpuCount;

    // Init hwloc topo
    hwloc_topology_init(&hwloc_topology);
    hwloc_topology_load(hwloc_topology);
    // Get hwloc object of Parallel Unit (PU, cores)
    hwloc_obj_c = hwloc_get_obj_by_type(hwloc_topology, HWLOC_OBJ_PU, 0);
    // Get hwloc object of Net Devices
    netds = hwloc_get_nbobjs_by_type(hwloc_topology, HWLOC_OBJ_OS_DEVICE);

    // Get total mem of CPU
    total_mem = hwloc_get_nbobjs_by_type(hwloc_topology, HWLOC_OBJ_MEMCACHE);
    
    cudaGetDeviceCount(&gpuCount);
    for (auto i = 0; i < gpuCount; i++) {
        cudaDeviceProp gpuProp;
        cudaGetDeviceProperties(&gpuProp, i);
        
    }
}